/**
 * @author wangxiaowei
 * 组织部发文列表
 */
var sort = null;
var grid = null;
function initzuzhibufawenlist(){
var colModel = new Ext.grid.ColumnModel([
		{header:'发文号',dataIndex:'wenhao',menuDisabled : true},
		{header:'主送机关',dataIndex:'zhusong',menuDisabled : true},
		{header:'标题',dataIndex:'biaoti',menuDisabled : true},		
		{header:'操作',dataIndex:'operate',menuDisabled : true},
		{header:'dutyId',dataIndex:'dutyId',hidden:true}
	]);
	var url = Ext.get('url').getValue();
	sort = new Ext.data.JsonStore({
		url:url,
		fields:['biaoti','zhusong','chaosong','fujian','operate','state','wenhao'],
		root:'root',
		totalProperty:'totalProperty'
	});
	var bbar = new Ext.PagingToolbar({
		pageSize:23,
		store:sort,
		displayInfo:true,
		emptyMsg:'没有记录'
	});
	
	 grid = new Ext.grid.GridPanel({
		title:'列表',
		
		cm:colModel,
		renderTo:'topic-grid',
		store:sort,
		loadMask:true,
		autoHeight:true,
		bbar:bbar,
		viewConfig:{
			forceFit:true,
			getRowClass:function(record,rowIndex,p,ds){
				if(record.get('state') == '是')
				{
					
					return 'red-row';
				}
				else if(record.get('state') == '中止')
				{
					
					return 'yellow-row';
				}
			}
		}
	});
	sort.load({params:{start:parseInt(Ext.get('xingzhengfajingshourenliststart').getValue()), limit: 23}});	
}




	
	